/**
 * @author wangpeizhi
 */
import request from '@/utils/request'

/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: {
      dictCode
    }
  })
}

/**
 * 查询题库
 * @param {*} data
 */
export function query(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionBankGate/query',
    method: 'post',
    data
  })
}
/**
 * 添加题库
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionBankGate/insert',
    method: 'post',
    data
  })
}
/**
 * 删除题库
 * @param {*} ids
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/questionBankGate/deleteByIds',
    method: 'get',
    params: { ids }
  })
}

/**
 * 获取分类树
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'post',
    data
  })
}
